package demo1229.homework;

public class demo_01 {
    public static void main(String[] args) {
        Runnable fe=new Runnable() {
            @Override
            public void run() {
                for (int i = 0; i <1000 ; i++) {
                    System.out.println(Thread.currentThread().
                            getName()+"你好,再见");
                }
            }
        };
        Thread dwa=new Thread(fe,"线程A");
        Thread dw=new Thread(fe,"线程B");
        dwa.start();
        dw.start();
    }

}
